-- UNITDEF -- Queen --
--------------------------------------------------------------------------------

local unitName = "Queen"

--------------------------------------------------------------------------------

local unitDef = {
  acceleration       = 1,
  brakeRate          = 1,
  buildCostMetal     = 10,
  canAttack          = true,
  canDGun			 = true,
  canMove            = true,
  canstop            = 1,
  category           = [[PLAYER UNARMORED UNIT TARGET]],
  collisionvolumetest = 1,
    customParams        = {
   	toggle1 = 2,
	toggle1on = [[Secondary]],
	toggle1off = [[Primary]],
	toggle1tooltip = [[Switch between weapons]],
    helptext       = [[The Queen specializes in fire power. It has a 2 large missiles launcher and flamer for weapons]],
     },
  corpse              = [[DEAD]],
  description        = [[Fire Support]],
  energyMake         = 0, 
  energyStorage      = 0,
  explodeAs          = [[Death]],
  footprintX         = 2,
  footprintZ         = 2,
  iconType           = [[armor]],
  idleAutoHeal       = 0,
  idleTime           = 30,
  levelGround        = false,
  maxDamage          = 1200,
  maxthisunit        = 1,
  maxVelocity        = 2, -- walk was 1.5
  metalMake          = 0,
  metalStorage       = 0,
  movementClass      = [[ENGINE]],
  name               = [[Basan]],  ---J: Basan =fire bird K: Kyo =Mountain dragon
  noChaseCategory    = [[NOTARGET AIR]],
  objectName         = [[queen.s3o]],
  radarDistance      = 0,
  reclaimable        = false,
  seismicSignature   = 1,
  selfDestructAs     = [[Death]],
  selfDestructCountdown = 1,
  showNanoFrame      = false,
  showPlayerName     = true,
  sightDistance      = 900, --- pawn 800 player 900?
  smoothAnim         = true,
  turnInPlace	    = 1,  --need for strafing
  turnRate           = 1000,
  unitname           = [[Queen]],
  upright            = true,
  sfxtypes = {
    explosiongenerators = {
	[[custom:missileshot]],
	[[custom:missileback]],
	[[custom:burning]],
	[[custom:JumpImpact]],
    },
  },
  -- sounds = {
    -- arrived = {
      -- [[commandgiven]],
    -- },
    -- ok = {
      -- [[commandgiven]],
    -- },
    -- select = {
      -- [[select]],
    -- },
  -- },
  weapons = {
    [1]  = {
      def                = [[gunq1]],
      onlyTargetCategory = [[TARGET]],
      mainDir            = [[0 0 1]], --- wont read quotes
      maxAngleDif        = 170,
    },
    [2]  = {
      def                = [[smallq1]],
      onlyTargetCategory = [[TARGET]],
	  mainDir            = [[0 0 1]], --- wont read quotes
      maxAngleDif        = 170,
    },
	[3]  = {
      def                = [[Stomp]],
	  badtargetcategory  = [[PLAYER BASE]],		
      onlyTargetCategory = [[SMALL]],
    },
  },
}


--------------------------------------------------------------------------------

local weaponDefs = {
  
  gunq1 = {
    name = [[Missile Launcher]], 
	id = 1,
	rendertype = 1,
	lineofsight = 1,
	CanAttackGround = false,
	turret = 1,
	burst = 3,
	burstrate = 0.3,
	ballistic = 0,
	smoketrail = 1,
	smokedelay = .1,
	model = [[srocket.s3o]],
	collideFriendly     =  false,
	accuracy = 1800,
	range = 500, --- 400 originally
	wobble = 800,
	reloadtime = 1.5,  --normally 3, but 1/2 since 1/2 damage
	areaofeffect = 30,
	weapontimer = 5,
	weaponvelocity = 650,
	startvelocity = 350,
	weaponacceleration = 320,
	turnrate = 600, --counter wobble?
	metalpershot = 0,
    energypershot = 0,	
	soundstart = [[Rocket]],
	soundhit = [[medexplo]],
	soundTrigger = 1,
	firestarter = 70,
	guidance = 1,
	tracks = 1,
	selfprop = 1,
	tolerance = 1000,
	explosiongenerator = [[custom:SMALLMISSILE_EXPLOSION]],
	impulsefactor = 0,
	impulseBoost = 0,
	craterMult = 0,
	craterBoost = 0,
	startsmoke = 1,
	InterceptedByShieldType = 2,

    damage = {
      default  = 54,  ---53.333
    },
  },
  
  Smallq1 = {
	name = [[Flamer]],
	id = 1,
	areaOfEffect = 90,
	burst = 40,
	burstRate = 0.01,
	CanAttackGround = false,
	cegTag = [[Flametrail]],
  
  damage = {
    default = 10, --400 dps
  },
  edgeEffectiveness = 0.25,
  explosionGenerator = [[custom:Flamethrower]],
  explosionSpeed = 0.01,
  fireStarter = 100,
  groundBounce = 0,
  impulseFactor = 0.000001,
  lineofsight = 1,
  range = 150,
  reloadTime = 3,
  rendertype = 1,
  size = 0.01,
  soundHit = none,
  soundStart = [[GEN_Flamethrower]],   --- credits go to s44 team sound released ccnc
  soundTrigger = 1,
  sprayAngle = 500,
  tolerance = 200,
  turret = 1,
  weaponTimer = 2,
  weaponVelocity = 240,
},

  Stomp       = {
      name                    = [[Stomp]],
      areaOfEffect            = 84,
      collideFriendly         = false,
      craterBoost             = 1,
      craterMult              = 1,

      damage                  = {
        default = 0,
		small = 50,
      },

      edgeEffectiveness       = 0.5,
      explosionGenerator      = [[custom:NONE]],
      impulseBoost            = 2, --might have to adjust
      impulseFactor           = 0.2,
      intensity               = 1,
      interceptedByShieldType = 1,
      lineOfSight             = false,
      noSelfDamage            = true,
      range                   = 30,
      reloadtime              = 1,
      renderType              = 4,
      rgbColor                = [[1 1 1]],
      thickness               = 1,
      tolerance               = 100,
      turret                  = true,
      weaponType              = [[Cannon]],
      weaponVelocity          = 0.8,
    },
	
}
unitDef.weaponDefs = weaponDefs

local featureDefs = {
    DEAD  = {
      description      = [[Wreckage - Engine]],
      blocking         = true,
      category         = [[corpses]],
      damage           = 1000,
      energy           = 0,
	  featureDead      = [[HEAP]],
      featurereclamate = [[SMUDGE01]],
      footprintX       = 3,
      footprintZ       = 4,
      height           = [[30]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[queen_dead.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      world            = [[All Worlds]],
    },
	
	 HEAP  = {
      description      = [[Debris - Engine]],
      blocking         = false,
      category         = [[heaps]],
      damage           = 500,
      energy           = 0,
      featurereclamate = [[SMUDGE01]],
      footprintX       = 3,
      footprintZ       = 3,
      height           = [[13]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[engine_heap.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      seqnamereclamate = [[TREE1RECLAMATE]],
      world            = [[All Worlds]],
    },
  }
  unitDef.featureDefs = featureDefs

--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
